<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>AbstractMapBag (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="AbstractMapBag (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractMapBag.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/bag/AbstractBagDecorator.html" title="class in org.apache.commons.collections4.bag"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/bag/AbstractMapBag.html" target="_top">Frames</a></li>
<li><a href="AbstractMapBag.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.collections4.bag</div>
<h2 title="Class AbstractMapBag" class="title">Class AbstractMapBag&lt;E&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.collections4.bag.AbstractMapBag&lt;E&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;E&gt;, <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;E&gt;, <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;E&gt;</dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/commons/collections4/bag/HashBag.html" title="class in org.apache.commons.collections4.bag">HashBag</a>, <a href="../../../../../org/apache/commons/collections4/bag/TreeBag.html" title="class in org.apache.commons.collections4.bag">TreeBag</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">AbstractMapBag&lt;E&gt;</span>
extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;E&gt;</pre>
<div class="block">Abstract implementation of the <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> interface to simplify the creation
 of subclass implementations.
 <p>
 Subclasses specify a Map implementation to use as the internal storage. The
 map will be used to map bag elements to a number; the number represents the
 number of occurrences of that element in the bag.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>3.0 (previously DefaultMapBag v2.0)</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: AbstractMapBag.java 1491258 2013-06-09 18:35:24Z tn $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested_class_summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected static class&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a></strong></code>
<div class="block">Mutable integer class for storing the data.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#AbstractMapBag()">AbstractMapBag</a></strong>()</code>
<div class="block">Constructor needed for subclass serialisation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#AbstractMapBag(java.util.Map)">AbstractMapBag</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>,<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a>&gt;&nbsp;map)</code>
<div class="block">Constructor that assigns the specified Map as the backing store.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#add(E)">add</a></strong>(<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&nbsp;object)</code>
<div class="block">Adds a new element to the bag, incrementing its count in the underlying map.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#add(E, int)">add</a></strong>(<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&nbsp;object,
   int&nbsp;nCopies)</code>
<div class="block">Adds a new element to the bag, incrementing its count in the map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#addAll(java.util.Collection)">addAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends <a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;&nbsp;coll)</code>
<div class="block">Invokes <a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#add(E)"><code>add(Object)</code></a> for each element in the given collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#clear()">clear</a></strong>()</code>
<div class="block">Clears the bag by clearing the underlying map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#contains(java.lang.Object)">contains</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Determines if the bag contains the given element by checking if the
 underlying map contains the element as a key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#containsAll(java.util.Collection)">containsAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;coll)</code>
<div class="block">Determines if the bag contains the given elements.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#doReadObject(java.util.Map, java.io.ObjectInputStream)">doReadObject</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>,<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a>&gt;&nbsp;map,
            <a href="http://download.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;in)</code>
<div class="block">Read the map in using a custom routine.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#doWriteObject(java.io.ObjectOutputStream)">doWriteObject</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;out)</code>
<div class="block">Write the map out using a custom routine.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#equals(java.lang.Object)">equals</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Compares this Bag to another.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#getCount(java.lang.Object)">getCount</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Returns the number of occurrence of the given element in this bag by
 looking up its count in the underlying map.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>,<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#getMap()">getMap</a></strong>()</code>
<div class="block">Utility method for implementations to access the map that backs this bag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#hashCode()">hashCode</a></strong>()</code>
<div class="block">Gets a hash code for the Bag compatible with the definition of equals.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#isEmpty()">isEmpty</a></strong>()</code>
<div class="block">Returns true if the underlying map is empty.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#iterator()">iterator</a></strong>()</code>
<div class="block">Gets an iterator over the bag elements.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#remove(java.lang.Object)">remove</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</code>
<div class="block">Removes all copies of the specified object from the bag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#remove(java.lang.Object, int)">remove</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
      int&nbsp;nCopies)</code>
<div class="block">Removes a specified number of copies of an object from the bag.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#removeAll(java.util.Collection)">removeAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;coll)</code>
<div class="block">Removes objects from the bag according to their count in the specified
 collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#retainAll(java.util.Collection)">retainAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;coll)</code>
<div class="block">Remove any members of the bag that are not in the given bag, respecting
 cardinality.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#size()">size</a></strong>()</code>
<div class="block">Returns the number of elements in this bag.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#toArray()">toArray</a></strong>()</code>
<div class="block">Returns an array of all of this bag's elements.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#toArray(T[])">toArray</a></strong>(T[]&nbsp;array)</code>
<div class="block">Returns an array of all of this bag's elements.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#toString()">toString</a></strong>()</code>
<div class="block">Implement a toString() method suitable for debugging.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#uniqueSet()">uniqueSet</a></strong>()</code>
<div class="block">Returns an unmodifiable view of the underlying map's key set.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="AbstractMapBag()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>AbstractMapBag</h4>
<pre>protected&nbsp;AbstractMapBag()</pre>
<div class="block">Constructor needed for subclass serialisation.</div>
</li>
</ul>
<a name="AbstractMapBag(java.util.Map)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AbstractMapBag</h4>
<pre>protected&nbsp;AbstractMapBag(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>,<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a>&gt;&nbsp;map)</pre>
<div class="block">Constructor that assigns the specified Map as the backing store. The map
 must be empty and non-null.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map to assign</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getMap()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMap</h4>
<pre>protected&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>,<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a>&gt;&nbsp;getMap()</pre>
<div class="block">Utility method for implementations to access the map that backs this bag.
 Not intended for interactive use outside of subclasses.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the map being used by the Bag</dd></dl>
</li>
</ul>
<a name="size()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>size</h4>
<pre>public&nbsp;int&nbsp;size()</pre>
<div class="block">Returns the number of elements in this bag.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#size()" title="class or interface in java.util">size</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#size()">size</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>current size of the bag</dd></dl>
</li>
</ul>
<a name="isEmpty()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre>public&nbsp;boolean&nbsp;isEmpty()</pre>
<div class="block">Returns true if the underlying map is empty.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#isEmpty()" title="class or interface in java.util">isEmpty</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>true if bag is empty</dd></dl>
</li>
</ul>
<a name="getCount(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCount</h4>
<pre>public&nbsp;int&nbsp;getCount(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Returns the number of occurrence of the given element in this bag by
 looking up its count in the underlying map.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#getCount(java.lang.Object)">getCount</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to search for</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of occurrences of the object, zero if not found</dd></dl>
</li>
</ul>
<a name="contains(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public&nbsp;boolean&nbsp;contains(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Determines if the bag contains the given element by checking if the
 underlying map contains the element as a key.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util">contains</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to search for</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the bag contains the given element</dd></dl>
</li>
</ul>
<a name="containsAll(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>containsAll</h4>
<pre>public&nbsp;boolean&nbsp;containsAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;coll)</pre>
<div class="block">Determines if the bag contains the given elements.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#containsAll(java.util.Collection)" title="class or interface in java.util">containsAll</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#containsAll(java.util.Collection)">containsAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>coll</code> - the collection to check against</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the Bag contains all the collection</dd></dl>
</li>
</ul>
<a name="iterator()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;&nbsp;iterator()</pre>
<div class="block">Gets an iterator over the bag elements. Elements present in the Bag more
 than once will be returned repeatedly.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#iterator()" title="class or interface in java.util">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#iterator()">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the iterator</dd></dl>
</li>
</ul>
<a name="add(java.lang.Object)">
<!--   -->
</a><a name="add(E)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;boolean&nbsp;add(<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&nbsp;object)</pre>
<div class="block">Adds a new element to the bag, incrementing its count in the underlying map.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#add(E)" title="class or interface in java.util">add</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#add(E)">add</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to add</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the object was not already in the <code>uniqueSet</code></dd></dl>
</li>
</ul>
<a name="add(java.lang.Object,int)">
<!--   -->
</a><a name="add(E, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>add</h4>
<pre>public&nbsp;boolean&nbsp;add(<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&nbsp;object,
          int&nbsp;nCopies)</pre>
<div class="block">Adds a new element to the bag, incrementing its count in the map.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#add(E, int)">add</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to search for</dd><dd><code>nCopies</code> - the number of copies to add</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if the object was not already in the <code>uniqueSet</code></dd></dl>
</li>
</ul>
<a name="addAll(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addAll</h4>
<pre>public&nbsp;boolean&nbsp;addAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends <a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;&nbsp;coll)</pre>
<div class="block">Invokes <a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html#add(E)"><code>add(Object)</code></a> for each element in the given collection.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util">addAll</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>coll</code> - the collection to add</dd>
<dt><span class="strong">Returns:</span></dt><dd><code>true</code> if this call changed the bag</dd></dl>
</li>
</ul>
<a name="clear()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;clear()</pre>
<div class="block">Clears the bag by clearing the underlying map.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#clear()" title="class or interface in java.util">clear</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="remove(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;boolean&nbsp;remove(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Removes all copies of the specified object from the bag.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#remove(java.lang.Object)" title="class or interface in java.util">remove</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#remove(java.lang.Object)">remove</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to remove</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the bag changed</dd></dl>
</li>
</ul>
<a name="remove(java.lang.Object, int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;boolean&nbsp;remove(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object,
             int&nbsp;nCopies)</pre>
<div class="block">Removes a specified number of copies of an object from the bag.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#remove(java.lang.Object, int)">remove</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the object to remove</dd><dd><code>nCopies</code> - the number of copies to remove</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the bag changed</dd></dl>
</li>
</ul>
<a name="removeAll(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeAll</h4>
<pre>public&nbsp;boolean&nbsp;removeAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;coll)</pre>
<div class="block">Removes objects from the bag according to their count in the specified
 collection.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util">removeAll</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#removeAll(java.util.Collection)">removeAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>coll</code> - the collection to use</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the bag changed</dd></dl>
</li>
</ul>
<a name="retainAll(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retainAll</h4>
<pre>public&nbsp;boolean&nbsp;retainAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;coll)</pre>
<div class="block">Remove any members of the bag that are not in the given bag, respecting
 cardinality.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#retainAll(java.util.Collection)" title="class or interface in java.util">retainAll</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#retainAll(java.util.Collection)">retainAll</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>coll</code> - the collection to retain</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if this call changed the collection</dd></dl>
</li>
</ul>
<a name="toArray()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toArray</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>[]&nbsp;toArray()</pre>
<div class="block">Returns an array of all of this bag's elements.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#toArray()" title="class or interface in java.util">toArray</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>an array of all of this bag's elements</dd></dl>
</li>
</ul>
<a name="toArray(java.lang.Object[])">
<!--   -->
</a><a name="toArray(T[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toArray</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;T[]&nbsp;toArray(T[]&nbsp;array)</pre>
<div class="block">Returns an array of all of this bag's elements.
 If the input array has more elements than are in the bag,
 trailing elements will be set to null.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#toArray(T[])" title="class or interface in java.util">toArray</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the type of the array elements</dd><dt><span class="strong">Parameters:</span></dt><dd><code>array</code> - the array to populate</dd>
<dt><span class="strong">Returns:</span></dt><dd>an array of all of this bag's elements</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ArrayStoreException.html?is-external=true" title="class or interface in java.lang">ArrayStoreException</a></code> - if the runtime type of the specified array is not
   a supertype of the runtime type of the elements in this list</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the specified array is null</dd></dl>
</li>
</ul>
<a name="uniqueSet()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uniqueSet</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;&nbsp;uniqueSet()</pre>
<div class="block">Returns an unmodifiable view of the underlying map's key set.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../org/apache/commons/collections4/Bag.html#uniqueSet()">uniqueSet</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4">Bag</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the set of unique elements in this bag</dd></dl>
</li>
</ul>
<a name="doWriteObject(java.io.ObjectOutputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doWriteObject</h4>
<pre>protected&nbsp;void&nbsp;doWriteObject(<a href="http://download.oracle.com/javase/6/docs/api/java/io/ObjectOutputStream.html?is-external=true" title="class or interface in java.io">ObjectOutputStream</a>&nbsp;out)
                      throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write the map out using a custom routine.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>out</code> - the output stream</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - any of the usual I/O related exceptions</dd></dl>
</li>
</ul>
<a name="doReadObject(java.util.Map, java.io.ObjectInputStream)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doReadObject</h4>
<pre>protected&nbsp;void&nbsp;doReadObject(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>,<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a>&gt;&nbsp;map,
                <a href="http://download.oracle.com/javase/6/docs/api/java/io/ObjectInputStream.html?is-external=true" title="class or interface in java.io">ObjectInputStream</a>&nbsp;in)
                     throws <a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>,
                            <a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></pre>
<div class="block">Read the map in using a custom routine.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>map</code> - the map to use</dd><dd><code>in</code> - the input stream</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - any of the usual I/O related exceptions</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassNotFoundException.html?is-external=true" title="class or interface in java.lang">ClassNotFoundException</a></code> - if the stream contains an object which class can not be loaded</dd>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/ClassCastException.html?is-external=true" title="class or interface in java.lang">ClassCastException</a></code> - if the stream does not contain the correct objects</dd></dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;object)</pre>
<div class="block">Compares this Bag to another. This Bag equals another Bag if it contains
 the same number of occurrences of the same elements.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util">equals</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>object</code> - the Bag to compare to</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if equal</dd></dl>
</li>
</ul>
<a name="hashCode()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<div class="block">Gets a hash code for the Bag compatible with the definition of equals.
 The hash code is defined as the sum total of a hash code for each
 element. The per element hash code is defined as
 <code>(e==null ? 0 : e.hashCode()) ^ noOccurances)</code>. This hash code
 is compatible with the Set interface.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#hashCode()" title="class or interface in java.util">hashCode</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="type parameter in AbstractMapBag">E</a>&gt;</code></dd>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the hash code of the Bag</dd></dl>
</li>
</ul>
<a name="toString()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre>
<div class="block">Implement a toString() method suitable for debugging.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a debugging toString</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AbstractMapBag.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/bag/AbstractBagDecorator.html" title="class in org.apache.commons.collections4.bag"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/bag/AbstractMapBag.html" target="_top">Frames</a></li>
<li><a href="AbstractMapBag.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested_class_summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
